package com.woniuxy.company5.service.impl;

import com.woniuxy.company5.dto.FinRepDto;
import com.woniuxy.company5.entity.FinRep;
import com.woniuxy.company5.mapper.FinRepMapper;
import com.woniuxy.company5.service.FinRepService;
import com.woniuxy.company5.vo.FinRepVo;
import com.woniuxy.company5.vo.WorkOrderDrawingVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * 功能描述
 *
 * @author PC
 * @date -2022/12/8-时间-17:43
 * @product company5
 */
@Service
public class FinRepServiceImpl implements FinRepService {
    @Resource
    private FinRepMapper finRepMapper;

    @Override
    public List<WorkOrderDrawingVo> WorkOrderDrawingCome() {
        ArrayList<WorkOrderDrawingVo> vos2 = new ArrayList<>();
        WorkOrderDrawingVo vo1 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo2 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo3 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo4 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo5 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo6 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo7 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo8 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo9 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo10 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo11 = new WorkOrderDrawingVo();
        WorkOrderDrawingVo vo12 = new WorkOrderDrawingVo();
        int a = 0;
        int b = 0;
        int a2 = 0;
        int b2 = 0;
        int a3 = 0;
        int b3 = 0;
        int a4 = 0;
        int b4 = 0;
        int a5 = 0;
        int b5 = 0;
        int a6 = 0;
        int b6 = 0;
        int a7 = 0;
        int b7 = 0;
        int a8 = 0;
        int b8 = 0;
        int a9 = 0;
        int b9 = 0;
        int a10 = 0;
        int b10 = 0;
        int a11 = 0;
        int b11 = 0;
        int a12 = 0;
        int b12 = 0;
        List<WorkOrderDrawingVo> vos = finRepMapper.WorkOrderDrawingCome1();
        List<WorkOrderDrawingVo> vos1 = finRepMapper.WorkOrderDrawingOut1();
        List<WorkOrderDrawingVo> vos3 = finRepMapper.WorkOrderDrawingCome2();
        List<WorkOrderDrawingVo> vos4 = finRepMapper.WorkOrderDrawingOut2();
        List<WorkOrderDrawingVo> vos5 = finRepMapper.WorkOrderDrawingCome3();
        List<WorkOrderDrawingVo> vos6 = finRepMapper.WorkOrderDrawingOut3();
        List<WorkOrderDrawingVo> vos7 = finRepMapper.WorkOrderDrawingCome4();
        List<WorkOrderDrawingVo> vos8 = finRepMapper.WorkOrderDrawingOut4();
        List<WorkOrderDrawingVo> vos9 = finRepMapper.WorkOrderDrawingCome5();
        List<WorkOrderDrawingVo> vos10 = finRepMapper.WorkOrderDrawingOut5();
        List<WorkOrderDrawingVo> vos11 = finRepMapper.WorkOrderDrawingCome6();
        List<WorkOrderDrawingVo> vos12 = finRepMapper.WorkOrderDrawingOut6();
        List<WorkOrderDrawingVo> vos13 = finRepMapper.WorkOrderDrawingCome7();
        List<WorkOrderDrawingVo> vos14 = finRepMapper.WorkOrderDrawingOut7();
        List<WorkOrderDrawingVo> vos15 = finRepMapper.WorkOrderDrawingCome8();
        List<WorkOrderDrawingVo> vos16 = finRepMapper.WorkOrderDrawingOut8();
        List<WorkOrderDrawingVo> vos17 = finRepMapper.WorkOrderDrawingCome9();
        List<WorkOrderDrawingVo> vos18 = finRepMapper.WorkOrderDrawingOut9();
        List<WorkOrderDrawingVo> vos19 = finRepMapper.WorkOrderDrawingCome10();
        List<WorkOrderDrawingVo> vos20 = finRepMapper.WorkOrderDrawingOut10();
        List<WorkOrderDrawingVo> vos21 = finRepMapper.WorkOrderDrawingCome11();
        List<WorkOrderDrawingVo> vos22 = finRepMapper.WorkOrderDrawingOut11();
        List<WorkOrderDrawingVo> vos23 = finRepMapper.WorkOrderDrawingCome12();
        List<WorkOrderDrawingVo> vos24 = finRepMapper.WorkOrderDrawingOut12();
        for (WorkOrderDrawingVo voss : vos) {
            a = voss.getValue();
        }
        for (WorkOrderDrawingVo vosss : vos1) {
            b = vosss.getValue();
        }
        for (WorkOrderDrawingVo c : vos3) {
            a2 = c.getValue();
        }
        for (WorkOrderDrawingVo c1 : vos4) {
            b2 = c1.getValue();
        }
        for (WorkOrderDrawingVo c2 : vos5) {
            a3 = c2.getValue();
        }
        for (WorkOrderDrawingVo c3 : vos6) {
            b3 = c3.getValue();
        }
        for (WorkOrderDrawingVo c4 : vos7) {
            a4 = c4.getValue();
        }
        for (WorkOrderDrawingVo c5 : vos8) {
            b4 = c5.getValue();
        }
        for (WorkOrderDrawingVo c6 : vos9) {
            a5 = c6.getValue();
        }
        for (WorkOrderDrawingVo c7 : vos10) {
            b5 = c7.getValue();
        }
        for (WorkOrderDrawingVo c8 : vos11) {
            a6 = c8.getValue();
        }
        for (WorkOrderDrawingVo c9 : vos12) {
            b6 = c9.getValue();
        }
        for (WorkOrderDrawingVo c10 : vos13) {
            a7 = c10.getValue();
        }
        for (WorkOrderDrawingVo c11 : vos14) {
            b7 = c11.getValue();
        }
        for (WorkOrderDrawingVo c12 : vos15) {
            a8 = c12.getValue();
        }
        for (WorkOrderDrawingVo c13 : vos16) {
            b8 = c13.getValue();
        }
        for (WorkOrderDrawingVo c14 : vos17) {
            a9 = c14.getValue();
        }
        for (WorkOrderDrawingVo c15 : vos18) {
            b9 = c15.getValue();
        }
        for (WorkOrderDrawingVo c16 : vos19) {
            a10 = c16.getValue();
        }
        for (WorkOrderDrawingVo c17 : vos20) {
            b10 = c17.getValue();
        }
        for (WorkOrderDrawingVo c18 : vos21) {
            a11 = c18.getValue();
        }
        for (WorkOrderDrawingVo c19 : vos22) {
            b11 = c19.getValue();
        }
        for (WorkOrderDrawingVo c20 : vos23) {
            a12 = c20.getValue();
        }
        for (WorkOrderDrawingVo c21 : vos24) {
            b12 = c21.getValue();
        }
        vo1.setName("一月营收");
        vo1.setValue(a-b);
        vos2.add(vo1);
        vo2.setName("二月营收");
        vo2.setValue(a2-b2);
        vos2.add(vo2);
        vo3.setName("三月营收");
        vo3.setValue(a3-b3);
        vos2.add(vo3);
        vo4.setName("四月营收");
        vo4.setValue(a4-b4);
        vos2.add(vo4);
        vo5.setName("五月营收");
        vo5.setValue(a5-b5);
        vos2.add(vo5);
        vo6.setName("六月营收");
        vo6.setValue(a6-b6);
        vos2.add(vo6);
        vo7.setName("七月营收");
        vo7.setValue(a7-b7);
        vos2.add(vo7);
        vo8.setName("八月营收");
        vo8.setValue(a8-b8);
        vos2.add(vo8);
        vo9.setName("九月营收");
        vo9.setValue(a9-b9);
        vos2.add(vo9);
        vo10.setName("十月营收");
        vo10.setValue(a10-b10);
        vos2.add(vo10);
        vo11.setName("十一月营收");
        vo11.setValue(a11-b11);
        vos2.add(vo11);
        vo12.setName("十二月营收");
        vo12.setValue(a12-b12);
        vos2.add(vo12);


        return vos2;
    }



    @Override
    public List<FinRepVo> selAll(FinRepDto finRepDto) {
        return finRepMapper.selAll(finRepDto);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return finRepMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(FinRep record) {
        return finRepMapper.insertSelective(record);
    }

    @Override
    public FinRep selectByPrimaryKey(Long id) {
        return finRepMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(FinRep record) {
        return finRepMapper.updateByPrimaryKeySelective(record);
    }
}
